<script lang="ts" setup>
import { ref } from 'vue'
/*
 * 打开弹框
 */
const dialogVisible = ref<boolean>(false)
const url = ref<string>('')
const openDialog = (urlVal: string) => {
  url.value = urlVal
  dialogVisible.value = true
}

defineExpose({ openDialog })
</script>
<template>
  <el-dialog v-model="dialogVisible" title="打印" width="700px" :close-on-click-modal="false">
    <div class="dialog-box">
      <!--文件-->
      <iframe class="print-frame" :src="url" frameborder="0"></iframe>
    </div>
  </el-dialog>
</template>
<style lang="scss" scoped>
.dialog-box {
  width: 100%;
  height: 610px;
  .print-frame {
    width: 100%;
    height: 100%;
  }
}
</style>
